<template>
  <header class="header">
    <a class="goback" @click="goBack"></a>
    <h3>{{title}}</h3>
  </header>
</template>
<style lang="less" scoped>
  .header{
    color: #fff;
    font-size: .4rem;;
    line-height: 1.4rem;;
    text-align: center;
    background: #e0818f;
    .goback{
      position: absolute;
      left: 0;
      width: 1.4rem;
      height: 1.4rem;
      &::before{
        position: absolute;
        content: '';
        top: .5rem;
        left: .5rem;
        width: .4rem;
        height: .4rem;
        border-left: 1px solid #fff;
        border-bottom: 1px solid #fff;
        transform: rotate(45deg);
      }
    }
  }
</style>
<script>
export default {
  props: ['title'],
  methods: {
    goBack() {
      this.$router.go(-1);
    },
  },
};
</script>
